import * as React from 'react';
import {observer} from 'mobx-react'
import styles from './index.scss';

import RowBar from '../../../home/RowBar'

interface IProps {
    dataX: string[]
    dataY: number[]
    title: string
    color: string[]
    unit: string
}

@observer
class Home extends React.Component<IProps> {

    constructor(props) {
        super(props);
    }


    public render() {
        const {dataX, dataY, title, color,unit} = this.props
        return (
            <div className={styles.bar}>
                <div className={styles.title}>{title}</div>
                <div className={styles.EC}>
                    <RowBar unit={unit} color={color} dataY={dataY} dataX={dataX} />
                </div>
            </div>
        );
    }
}

export default Home;
